package adventure_game;

/**
 * Controls the amount of words being used, max number of words = 2.
 * @author Frank, Morten B, Ronni
 *
 */
public class Command
{
    private CommandWord commandWord;
    private String secondWord;
    
    /**
    * commandWord must be valid, secondword can be null.
    */
    public Command(CommandWord commandWord, String secondWord)
    {
        this.commandWord = commandWord;
        this.secondWord = secondWord;
    }
    
    /**
    * First word
    */
    public CommandWord getCommandWord()
    {
        return commandWord;
    }
    
    /**
    * Second word
    */
    public String getSecondWord()
    {
        return secondWord;
    }

    /**
    * Unknown word
    */
    public boolean isUnknown()
    {
        return (commandWord == CommandWord.UNKNOWN);
    }

    /**
    * Does it have a second word
    */
    public boolean hasSecondWord()
    {
        return (secondWord != null);
    }
}

